// TipThread.cpp : implementation file
//

#include "stdafx.h"
#include "WorkDll.h"
#include "TipThread.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CTipThread

IMPLEMENT_DYNCREATE(CTipThread, CWinThread)

CTipThread::CTipThread()
{
}

CTipThread::~CTipThread()
{
}

BOOL CTipThread::InitInstance()
{
	// TODO:  perform and per-thread initialization here
	AfxEnableControlContainer();

	#ifdef _AFXDLL
	Enable3dControls();			// Call this when using MFC in a shared DLL
	#else
	Enable3dControlsStatic();	// Call this when linking to MFC statically
	#endif

	dialog.Create(IDD_DIALOGTIP);
	dialog.ShowWindow(SW_NORMAL);
	m_pMainWnd=&dialog;
	return TRUE;
}

int CTipThread::ExitInstance()
{
	// TODO:  perform any per-thread cleanup here
	dialog.DestroyWindow();
	return CWinThread::ExitInstance();
}

BEGIN_MESSAGE_MAP(CTipThread, CWinThread)
	//{{AFX_MSG_MAP(CTipThread)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTipThread message handlers

int CTipThread::Run() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CWinThread::Run();
}

void CTipThread::Show()
{
	dialog.ShowWindow(SW_NORMAL);
}